#include <bits/stdc++.h>
// 2024/08/07
// tag: 递归
using namespace std;

int k, cnt;

// 递归函数，用于计算组合数
void combineHelper(int n, int start = 1, int current = 0)
{
    // 如果当前组合数等于k，则计数器加1
    if (current == k)
    {
        cnt += !n;
        return;
    }

    // 遍历从start到n/k的组合数
    for (int i = start; i <= n / (k - current); ++i)
        combineHelper(n - i, i, current + 1);
}

signed main()
{
    int n;
    cin >> n >> k;
    combineHelper(n);
    cout << cnt << endl;
    return 0;
}